package com.sk.sqd;

import com.sk.sqd.component.ConcreteComponent;
import com.sk.sqd.decorator.ConcreteDecorator;

import java.io.InputStream;

public class DecoratorTest {

    public static void main(String[] args) {
        // 调用具体的角色的方法
        ConcreteComponent concreteComponent = new ConcreteComponent();
        concreteComponent.operation();

        // 通过装饰器调用具体的角色，并增加额外的功能
        ConcreteDecorator concreteDecorator = new ConcreteDecorator(concreteComponent);
        concreteDecorator.operation();
    }
}
